package stat

Import Path
	github.com/K-Phoen/grabana/stat (on go.dev)

Dependency Relation
	imports 9 packages, and imported by one package

Involved Source Files stat.go
Package-Level Type Names (total 8)
/* sort by: | */
Option represents an option that can be used to configure a stat panel. func AbsoluteThresholds(steps []ThresholdStep) Option func ColorBackground() Option func ColorNone() Option func ColorScheme(options ...scheme.Option) Option func ColorValue() Option func DataSource(source string) Option func Decimals(count int) Option func Description(content string) Option func Height(height string) Option func Links(panelLinks ...links.Link) Option func NoValue(text string) Option func Orientation(mode OrientationMode) Option func RelativeThresholds(steps []ThresholdStep) Option func Repeat(repeat string) Option func RepeatDirection(direction sdk.RepeatDirection) Option func Span(span float32) Option func SparkLine() Option func SparkLineYMax(value float64) Option func SparkLineYMin(value float64) Option func Text(mode TextMode) Option func TitleFontSize(size int) Option func Transparent() Option func Unit(unit string) Option func ValueFontSize(size int) Option func ValueType(valueType ReductionType) Option func WithGraphiteTarget(query string, options ...graphite.Option) Option func WithInfluxDBTarget(query string, options ...influxdb.Option) Option func WithPrometheusTarget(query string, options ...prometheus.Option) Option func WithStackdriverTarget(target *stackdriver.Stackdriver) Option func New(title string, options ...Option) (*Stat, error) func github.com/K-Phoen/grabana/row.WithStat(title string, options ...Option) row.Option
OrientationMode controls the layout. func Orientation(mode OrientationMode) Option const OrientationAuto const OrientationHorizontal const OrientationVertical
RangeMap allows to map a range of values into explicit text. From string Text string To string
ReductionType lets you set the function that your entire query is reduced into a single value with. func ValueType(valueType ReductionType) Option const Avg const Count const First const FirstNonNull const Last const LastNonNull const Max const Min const Range const Total
Stat represents a stat panel. Builder *sdk.Panel func New(title string, options ...Option) (*Stat, error)
TextMode controls if name and value is displayed or just name. func Text(mode TextMode) Option const TextAuto const TextName const TextNone const TextValue const TextValueAndName
Color string Value *float64 func AbsoluteThresholds(steps []ThresholdStep) Option func RelativeThresholds(steps []ThresholdStep) Option
ValueMap allows to map a value into explicit text. Text string Value string
Package-Level Functions (total 30)
AbsoluteThresholds changes the background and value colors dynamically within the panel, depending on the value. The threshold is defined by a series of steps values which, each having a value and an associated color.
ColorBackground will show the threshold's colors in the background.
ColorNone will not color the value or the background.
ColorScheme configures the color scheme.
ColorValue will show the threshold's colors on the value itself.
DataSource sets the data source to be used by the panel.
Decimals sets the number of decimals that should be displayed.
Description annotates the current visualization with a human-readable description.
Height sets the height of the panel, in pixels. Example: "400px".
New creates a new stat panel.
NoValue defines what to show when there is no value.
Orientation changes the orientation of the layout.
RelativeThresholds changes the background and value colors dynamically within the panel, depending on the value. The threshold is defined by a series of steps values which, each having a value defined as a percentage and an associated color.
Repeat configures repeating a panel for a variable
RepeatDirection configures repeating vertical or horizontal
Span sets the width of the panel, in grid units. Should be a positive number between 1 and 12. Example: 6.
SparkLine displays the spark line summary of the series in addition to the stat.
SparkLineYMax defines the largest value expected on the Y axis of the spark line.
SparkLineYMin defines the smallest value expected on the Y axis of the spark line.
Text indicates if name and value is displayed or just name.
TitleFontSize sets the font size used to display the title.
Transparent makes the background transparent.
Unit sets the unit of the data displayed on this axis.
ValueFontSize sets the font size used to display the value.
ValueType configures how the series will be reduced to a single value.
WithGraphiteTarget adds a Graphite target to the graph.
WithInfluxDBTarget adds an InfluxDB target to the graph.
WithPrometheusTarget adds a prometheus query to the graph.
WithStackdriverTarget adds a stackdriver query to the graph.
Package-Level Constants (total 18)
Avg displays the average of the series.
Count displays the number of value in the series.
First displays the first value of the series.
FirstNonNull displays the first non-null value of the series.
Last displays the last value of the series.
LastNonNull displays the last non-null value of the series.
Max displays the largest value of the series.
Min displays the smallest value of the series.
Range displays the difference between the minimum and maximum values.
const TextAuto TextMode = "auto"
const TextName TextMode = "name"
const TextNone TextMode = "none"
const TextValue TextMode = "value"
const TextValueAndName TextMode = "value_and_name"
Total displays the sum of values in the series.